Skip to content

Porting InspiralESIGMA from LALSimulation#7

Closed
samanwaya-mukherjee wants to merge 37 commits into
gwnrtools:masterfrom
samanwaya-mukherjee:python_dev
Closed

Porting InspiralESIGMA from LALSimulation#7
samanwaya-mukherjee wants to merge 37 commits into
gwnrtools:masterfrom
samanwaya-mukherjee:python_dev

Conversation

@samanwaya-mukherjee

@samanwaya-mukherjee samanwaya-mukherjee commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

🐍 Integrate Python Translations of LALSuite C Waveform Code

Summary

This PR integrates Python implementations of waveform generation routines translated from the corresponding C codes in LALSuite. The goal is to enable easier experimentation and validation within a Python-native workflow while preserving consistency with the original implementation.

Features / Changes

  • Added Python implementations for the following spherical harmonic modes:
    • $(2, \pm 2), (2, \pm 1)$
    • $(3, \pm 3), (3, \pm 2), (3, \pm 1)$
    • $(4, \pm 4)$
  • Implemented orbital evolution using SciPy’s solve_ivp with method='LSODA'
  • Structured modules to mirror the original C code organization where possible

Numerical Details

  • ODE integration handled via scipy.integrate.solve_ivp
  • LSODA chosen for automatic stiffness detection and robustness across regimes
  • Important difference: In LALSuite, absolute tolerance was chosen to be zero, here we have chosen atol=1e-25.

Validation

  • Compared outputs against the original C implementation
Screenshot 2026-05-14 172943 Screenshot 2026-05-14 173213 Screenshot 2026-05-14 173233
  • Mode mismatches found for this particular parameter set:
Screenshot 2026-05-14 175407

Limitations / TODO

  • Remaining modes not yet implemented
  • Performance not yet optimized (pure Python vs C)
  • Further validation across wider parameter space needed

How to Test

  • Run the example notebook: esigma_python.ipynb
  • Verify waveform agreement / mismatch thresholds

@prayush prayush changed the title Python dev Porting InspiralESIGMA from LALSimulation Apr 21, 2026
@prayush prayush added the enhancement New feature or request label Apr 21, 2026
@prayush

prayush commented May 4, 2026

Copy link
Copy Markdown
Contributor

@samanwaya-mukherjee if this is ready for review, please let us know by removing the "draft" status.

@samanwaya-mukherjee samanwaya-mukherjee marked this pull request as ready for review May 13, 2026 23:27
@samanwaya-mukherjee samanwaya-mukherjee self-assigned this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants